/**
 * 
 */
package kulstats;

/**
 * @author steven
 *
 */
public class Registry {
	private static Registry instance;
	
	//protected DAO dao;
	
	protected ActivityManager activityManager;
	protected CourseManager courseManager;
	protected MilestoneManager milestoneManager;
	protected QuestionnaireManager questionnaireManager;
	protected StatisticsManager statisticsManager;
	protected UserManager userManager;
	
	protected Registry() {
		//dao = new DAO();
		//dao = null;

		activityManager = new ActivityManager();
		courseManager = new CourseManager();
		milestoneManager = new MilestoneManager();
		questionnaireManager = new QuestionnaireManager();
		statisticsManager = new StatisticsManager();
		userManager = new UserManager();

		/*activityManager = new ActivityManager(dao);
		courseManager = new CourseManager(dao);
		milestoneManager = new MilestoneManager(dao);
		questionnaireManager = new QuestionnaireManager(dao);
		statisticsManager = new StatisticsManager(dao);
		userManager = new UserManager(dao);*/
	}

	/**
	 * @return the instance
	 */
	public static Registry getInstance() {
		if (instance == null) {
			instance = new Registry();
		}
		return instance;
	}

	/**
	 * @return the dao
	 */
	/* static DAO dao() {
		return getInstance().dao;
	}*/

	/**
	 * @return the activityManager
	 */
	public static ActivityManager activityManager() {
		return getInstance().activityManager;
	}

	/**
	 * @return the courseManager
	 */
	public static CourseManager courseManager() {
		return getInstance().courseManager;
	}

	/**
	 * @return the milestoneManager
	 */
	public static MilestoneManager milestoneManager() {
		return getInstance().milestoneManager;
	}

	/**
	 * @return the questionnqireManager
	 */
	public static QuestionnaireManager questionnaireManager() {
		return getInstance().questionnaireManager;
	}

	/**
	 * @return the statisticsManager
	 */
	public static StatisticsManager statisticsManager() {
		return getInstance().statisticsManager;
	}

	/**
	 * @return the userManager
	 */
	public static UserManager userManager() {
		return getInstance().userManager;
	}
	
}
